package com.ziytek.web.citizen.mapper;

import com.ziytek.web.citizen.configuration.db.DDS;
import com.ziytek.web.citizen.constant.DdsConstant;
import com.ziytek.web.citizen.pojo.basic.BatchNo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author fenghx
 * @version 1.0
 * @className BasicDataBatchMapper
 * Description:
 * @date 2024/3/25 16:08
 */
@Mapper
public interface BatchNoMapper extends EasyBaseMapper<BatchNo> {

    /**
     * Description: 新增
     *
     * @param columnName columnName
     * @return Long
     *
     */
    @DDS(DdsConstant.DS_BASIC)
    Long hasColum(String columnName);

    /**
     * Description: 新增
     *
     * @param columnName columnName
     * @return Long
     *
     */
    @DDS(DdsConstant.DS_BASIC)
    void addColum(@Param("columnName") String columnName);

    /**
     * Description: 新增
     *
     * @param batchNo batchNo
     */
    @DDS(DdsConstant.DS_BASIC)
    void insertData(BatchNo batchNo);

    /**
     * Description: 新增
     *
     * @param batchNo batchNo
     */
    @DDS(DdsConstant.DS_BASIC)
    void updateData(BatchNo batchNo);

    /**
     * Description: 查询数据
     *
     * @param cabinetNo cabinetNo
     * @return batchNo
     */
    @DDS(DdsConstant.DS_BASIC)
    BatchNo queryLastBatchNo(Integer cabinetNo);


    /**
     * Description: 查询数据
     *
     * @param cabinetNo cabinetNo
     * @param batchNo   batchNo
     * @return batchNo
     */
    @DDS(DdsConstant.DS_BASIC)
    BatchNo queryLastBatchNoAndCabinetNo(Integer cabinetNo, String batchNo);

    /**
     * Description: 查询列表数据
     *
     * @return batchNo
     */
    @DDS(DdsConstant.DS_BASIC)
    List<BatchNo> queryBatchNoListNot();

    /**
     * Description: 查询列表数据
     *
     * @param cabinetNo cabinetNo
     * @return batchNo
     */
    @DDS(DdsConstant.DS_BASIC)
    List<BatchNo> queryBatchNoListByCabinetNo(Integer cabinetNo);

    /**
     * Description: 查询列表数据
     *
     * @param cabinetNo cabinetNo
     * @param day       day
     * @return batchNo
     */
    @DDS(DdsConstant.DS_BASIC)
    List<BatchNo> queryBatchNoList(Integer cabinetNo, Integer day);
}
